package com.ruoyi.yey.student;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.yey.config.mybatis.MybatisDateTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("yry_student")
public class StudentEntity implements Serializable {

    @TableId(value = "id" ,type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "学生姓名")
    private String studentName;
    @ApiModelProperty(value = "性别")
    private String studentSex;
    @ApiModelProperty(value = "出生日期")
    private String studentBirthday;
    @ApiModelProperty(value = "学生头像")
    private String studentAvatar;

    @TableField(exist = false)
    private Integer kgId; //所属幼儿园id
    @TableField(exist = false)
    private String kgName; //所属幼儿园名称
    private Integer classId; //所属班级id
    @TableField(exist = false)
    private String className; //所属班级名称

    @TableField(fill = FieldFill.INSERT,value = "create_by")
    private String createBy;

    @TableField(fill = FieldFill.INSERT,value = "create_time",typeHandler = MybatisDateTypeHandler.class)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_by")
    private String updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_time",typeHandler = MybatisDateTypeHandler.class)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
    private Date updateTime;

    @TableField(value = "del_flag")
    @TableLogic(value = "0",delval = "1")
    private String delFlag = "0";


    @TableField(exist = false)
    private int[] kgClass;


}
